package ArrayList;

import java.util.ArrayList;
import java.util.StringJoiner;

public class Demo2 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("点赞");
        list.add("投币");
        list.add("关注");
        list.add("收藏");
        StringJoiner sj =new StringJoiner(",","[","]");
        for (int i = 0; i < list.size(); i++) {
            sj.add(list.get(i));
        }
        System.out.println(sj);


    }
}
